<!-- modal template -->
<div class="modal-header">
    <h4 class="modal-title" id="myModalLabel">{{i18n.user_add_title}}</h4>
</div>
<form class="form-horizontal" name="userAddForm" novalidate="novalidate">
    <div class="modal-body">
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-md-2 control-label require">{{i18n.user_userAccount}}</label>

                    <div class="col-md-4">
                        <input type="text" name="userAccount" class="input-sm form-control"
                               ng-model="userAdd.userAccount" ng-required="true"/>
                    </div>

                    <label class="col-md-2 control-label require">{{i18n.user_userPassword}}</label>

                    <div class="col-md-4 ">
                        <input type="password" name="userPassword" class="input-sm form-control"
                               ng-model="userAdd.userPassword"
                               ng-required="true"
                                />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label require">{{i18n.user_userName}}</label>

                    <div class="col-md-4 ">
                        <input type="text" name="userName" class="input-sm form-control"
                               ng-model="userAdd.userName"
                               ng-required="true"/>
                        <!--  <span class="glyphicon glyphicon-ok form-control-feedback" ng-show="userAddForm.userRealName.$valid"></span>
                            <span class="input-error" ng-show="userAddForm.userRealName.$error.account"><i></i>请输入数字、字母或下划线</span> -->
                    </div>
                    <!--<label class="col-md-2 control-label ">性别</label>-->
                    <label class="col-md-2 control-label require">{{i18n.user_email}}</label>
                   <!-- <div class="col-md-4">
                        <label class="radio-inline">
                            <input name="userGender" type="radio" value="男" ng-model="userAdd.userGender"
                                   ng-checked="true">
                            男
                        </label>
                        <label class="radio-inline">
                            <input name="userGender" type="radio" value="女" ng-model="userAdd.userGender">
                            女
                        </label>
                    </div>-->
                    <div class="col-md-4">
                        <input type="text" name="email" ng-pattern="" class="input-sm form-control"
                               ng-model="userAdd.email"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label require">{{i18n.user_userOrgName}}</label>

                    <div class="col-md-4 ">
                        <input type="text" name="userOrgName"
                               class="form-control  input-sm ng-pristine ng-untouched ng-valid"
                               placeholder="please selected userOrgName" ng-required="true" ng-click="selectOrgs()" style="cursor: pointer;"
                               readonly="readonly" ng-model="userAdd.userOrgName"/>
                    </div>
                    <label class="col-md-2 control-label require">{{i18n.user_userEnable}}</label>

                    <div class="col-md-4">
                        <label class="radio-inline">
                            <input name="userEnable" type="radio" value="1" ng-model="userAdd.userEnable"
                                   ng-checked="true">
                            {{i18n.status_enable}}
                        </label>
                        <label class="radio-inline">
                            <input name="userEnable" type="radio" value="0" ng-model="userAdd.userEnable">
                            {{i18n.status_unable}}
                        </label>

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label"> {{i18n.user_userTelephone}}</label>

                    <div class="col-md-4">
                        <input type="text" name="userTelephone" ng-pattern="/^([0-9]+)$/" class="input-sm form-control"
                               ng-model="userAdd.userTelephone"/>
                    </div>
                    <label class="col-md-2 control-label">{{i18n.user_userMobile}}</label>

                    <div class="col-md-4">
                        <input type="text" name="userMobile" ng-pattern="/^([0-9]+)$/" class="input-sm form-control"
                               ng-model="userAdd.userMobile"/>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="modal-footer">
        <button type="button" class="btn btn-default" ng-click="cancel()">{{i18n.btn_cancel}}</button>
        <button type="submit" ng-disabled="userAddForm.$invalid" class="btn btn-primary" ng-click="ok()">{{i18n.btn_ok}}</button>
    </div>
</form>
